package com.lj.back.manage.scaffold.module.sys.DTO;

import com.lj.back.manage.scaffold.common.annotation.valid.EnumCheck;
import com.lj.back.manage.scaffold.common.annotation.valid.Phone;
import com.lj.back.manage.scaffold.common.enums.UserStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.util.Set;

/**
 * @author lv
 * @version 1.0.0
 */
@Data
@ApiModel("重置用户信息传输对象")
public class SysResetUserDTO {

    @ApiModelProperty(value = "需要重置密码的用户ID",example = "1",required = true)
    @NotNull(message = "{user.id.notnull}")
    private Long id;

    @ApiModelProperty(value = "密码,MD5加密",example = "E10ADC3949BA59ABBE56E057F20F883E")
    private String password;

    @ApiModelProperty(value = "真实姓名",example = "李四")
    private String realName;

    @Email(message = "{email.pattern}")
    @ApiModelProperty(value = "邮箱", example = "1234567@163.com")
    private String email;

    @Phone
    @ApiModelProperty(value = "手机号", example = "13912345678")
    private String mobile;

    @ApiModelProperty(value = "用户状态 1正常  2锁定", example = "1")
    @EnumCheck(enumClass = UserStatusEnum.class)
    private String status;

    @ApiModelProperty(value = "角色ID集合", example = "[1, 2, 3]")
    private Set<Long> roleIds;
}
